code, kbd, pre, samp
  font-family: $font-code

.content.custom {
  display: block;
  min-height: 150px;
  font-size: 16px;
  line-height: 1.8;
  color: $content-color;

  p {
    word-wrap: break-word;
  }

  h1, h2, h3, h4, h5, h6, ol, ul, pre, table, figure {
    margin-bottom: 1.2em
  }

  h1, h2, h3, h4, h5, h6 {
    padding-top: 3em;
    margin-top: -1.8em;
    text-transform: capitalize;

    .header-anchor {
      margin-left: -1em;
      padding-right: 4px;
      color: $light-primary-color;
      opacity: 0;
      text-decoration: none;
    }

    &:hover {
      .header-anchor {
        opacity: 1;
      }
    }
  }

  a {
    position relative
    text-decoration none
    &:after {
      content ''
      position absolute
      left 0
      bottom 0
      height 1px
      width 100%
      background rgba($primary-color, .2)
      transition height 200ms ease-in
    }
    &:hover:after {
      height 100%
    }
  }

  blockquote {
    margin 2em 0 2em 1em
    padding 4px 24px
    font-style italic
    color $gray-color
    border-left .375em solid $primary-color
    p {
      margin-top: 0
      &:last-child {
        margin-bottom: 0
      }
    }
    footer {
      font-size 80%
    }
  }

  strong {
    font-weight: 600;
    margin: 0 0.2em;
  }

  code, kbd {
    display: inline;
    margin: 0 0.3em;
    padding: .125em .25em;
    box-shadow: none;
  }

  pre,
  pre[class*="language-"] {
    margin-left: -1.75em;
    margin-right: -1.75em;
    padding: 1.25em 1.75em;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    background: #3e3e3e;
  }
  pre[class*='language-'] {
    position relative
    &:before {
      position: absolute;
      top: 0.8em;
      right: 1em;
      font-size: .86em;
      color: rgba(255, 255, 255, 0.7);
    }
  }

  pre {
    code {
      margin: 0;
      padding: 0;
      background-color: transparent;
      font-size: .86em;
      font-weight: 500;
      color: rgba(255, 255, 255, 0.8);

      &:before, &:after {
        content: '';
        letter-spacing: 0;
      }
    }
  }

  ol, ul {
    padding-left: 2em;
  }

  table {
    width: 100%;
    border: 1px solid #dedede;
    border-collapse: collapse;
    border-spacing: 0;

    thead {
      tr {
        background: #f8f8f8;
      }
    }

    tbody {
      tr {
        &:hover {
          background: #efefef;
        }
      }
    }

    td, th {
      border: 1px solid #dedede;
      padding: .375em .75em;
    }
  }

  video, audio {
    max-width: 100%;
  }

  .highlighted-line {
    display: block;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
    background-color: rgba(0, 0, 0, 66%);
  }

  *:first-child {
    margin-top 0
  }
}

for type, exts in $code-languages
  pre
    &.language-{exts[0]}:before
      content type
    if exts[1]
      &.language-{exts[1]}:before
        content type

.custom-block
  margin-bottom 1.2em
  padding 1em 1.5em 0.2em
  border-left-width .375em
  border-left-style solid
  border-radius 4px
  &-title
    font-weight 600
  for type, color in $custom-blocks
    &.{type}
      color darken(color, 20%)
      border-color color!important
      background lighten(color, 90%)!important
